package com.storm.controls.menu
{
	import com.storm.container.IBaseItem;
	import com.storm.interfaces.IDataItem;
	import com.storm.interfaces.ISelectableItem;
	
	import mx.core.UIComponent;
	
	public class MenuItem extends UIComponent implements IBaseItem {
		public function MenuItem() {
			super();
		}
		
		override public function set data(value:Object):void {
			var oldData:Object = this.data;
			if (oldData == value) return;
			this.data = value;
			this.itemDataChanged(oldData, value);
		}
		
		protected function itemDataChanged(oldData:Object, newData:Object):void {
			
		}
		
		private var _selected:Boolean = false;
		public function get selected():Boolean {
			return this._selected;
		}
		public function set selected(value:Boolean):void {
			if (this._selected == value) return;
			this._selected = value;
			this.selectedChanged(value);
		}
		
		protected function selectedChanged(selected:Boolean):void {
			
		}
	}
}